package com.codecrane.core.util;

/**
 * Created by 752322896 on 2019/4/8.
 */
public enum PerformanceStatusEnum {
    待审批(0, "待审批"),
    审批中(1, "审批中"),
    退回(11, "退回"),
    审批通过(2, "审批通过"),
    评分审批中(3, "评分审批中"),
    重新审批中(31, "重新审批中"),
    已结束(6, "已结束"),
    已归档(7, "已归档"),;

    private int code;
    private String msg;

    PerformanceStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    /**
     * 根据充值类型获取充值的天数
     */
    public static String getStatus(int code) {
        for (PerformanceStatusEnum countryEnum : PerformanceStatusEnum.values()) {
            if (code == countryEnum.getCode()) {
                return countryEnum.getMsg();
            }
        }
        return "";
    }
}
